﻿@model  System.Data.Entity.DbSet<Model.Localidad>

@{
    ViewBag.Title = "Index";
}


<br /><br /><br /><br />
<div align="center">
  
    <img src="~/Content/images/localidades.png" />

    
        <table class="table table-hover">

            <thead>
                <tr>
                    <th class="success">Id</th>
                    <th class="success">Localidad</th>
                    <th class="success">Codigo Postal</th>
                    <th class="success">Opciones</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model)
                {
                    
                    <tr>
                        <td>@item.id</td>
                        <td>@item.nombre </td>
                        <td>@item.codigo</td>
                        
                        <td width="30%">
                            <a href="@Url.Action("Editar")?id=@item.id">
                                <button type="button" class="btn btn-success">Editar
                                    <span class="glyphicon glyphicon-pencil"></span></button>

                            </a>
                            <a href="@Url.Action("Eliminar")?id=@item.id">

                            <button type="button" class="btn btn-danger">
                                Eliminar
                                <span class="glyphicon glyphicon-trash"></span>
                            </button>

                            </a>
                        </td>
                        
                    </tr>
                }
            </tbody>

        </table>
        <br />


    
    <a href="@Url.Action("Agregar")" class="btn btn-primary" role="button">Agregar</a>
    <a href="@Url.Action("Index","home")" class="btn btn-primary" role="button">Volver</a>
    <br/></br>



</div>


